package com.qf.controller;

import com.qf.stream.ProviderStram;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.GenericMessage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wbzs,
 * @date 2022/10/27,
 * @time 19:15,
 */
@RestController
public class TestController {

    @Autowired
    private ProviderStram providerStram;

    @RequestMapping("/send")
    public String send(String msg){
        providerStram.MESSAGE_CHANNEL().send(new GenericMessage<>(msg));
        return "success";
    }


}
